import {post, get, postForm} from './api'

/**
 * 后台接口
 * 
 */

//  const baseURL =  'http://47.92.10.30:8184/adminAPI/'


export default {
    admin: {
        // 上传文件
        uploadFile: (data, callbac) => post('http://47.92.10.30:8080/webAPI/common/fileUploadToOSS', data, callbac),
        // 登陆 ok
        apiAdminLogin : (data, callbac) => post('user/admin/login', data, callbac), 
        // 登出 ok
        apiLoginOut: (data, callbac)=>post('user/admin/logout', data, callbac),
        // 新增管理员
        apiAddAdmin: (data, callbac) => post('user/admin/addUser', data, callbac),
        // 添加活动类型 ok
        addActivityType: (data, callbac) => post('EventType/addType', data, callbac),
        // 删除活动类型 ok
        delActivityType: (data, callbac) => post('EventType/deleteType', data, callbac),
        // 查看活动类型列表  ok
        viewActivityList: (data, callbac) => get('EventType/showTypeList', data, callbac),
        // 查看活动列表  ok
        apiGetActivityList: (data, callbac) => get('EventBase/showEventList', data, callbac),
        // 添加活动  ok
        apiAddActivity: (data, callbac) => post('EventBase/addEventInfo', data, callbac),
        // 冻结活动 ok
        apiDelActivity: (data, callbac) => post('EventBase/freezeEvent', data, callbac),
        // 活动详情 ok
        apiActivityDetail: (data, callbac) => get('EventBase/showEventInfo', data, callbac),
        // 活动日程列表 ok
        apiGetActivityDayList: (data, callbac) => get('EventSchedule/showScheduleList', data, callbac),
        // 添加活动日程详情 ok
        apiAddActivityDayDetail: (data, callbac) => post('EventSchedule/addEventReport', data, callbac),
        // 查看活动日程详情 
        apiViewDayDetail: (data, callbac) => get('EventSchedule/showEventReportAdmin', data, callbac),
        // 修改日程详情
        apiEditDayDetail:  (data, callbac) => post('EventSchedule/updateEventReport', data, callbac),
        // 修改活动详情
        apiEditActivityDetail: (data, callbac) => post('EventBase/updateEventInfo', data, callbac),
        // 查看活动详情
        adiViewActivityDetail: (data, callbac) => get('EventBase/showEventInfo', data, callbac),
        // 报名人列表 ok
        apiGetSignPeople: (data, callbac) => get('EventSchedule/showSignUpList', data, callbac),
        // 获取管理员列表 ok
        apiGetAdminList: (data, callbac) => get('user/admin/getList', data, callbac),
        // 查看管理员详情 ok
        apiViewAdminDetail: (data, callbac) => get('user/admin/getById', data, callbac),
        // 修改管理员详情
        apiEditAdminDetail: (data, callbac) => post('user/admin/update', data, callbac),
        // 修改管理员状态
        apiEditAdminState: (data, callbac) => post('user/admin/updateState', data, callbac),
        // 获得角色列表
        apiGetRoleList: (data, callbac) => get('role/getAll', data, callbac),
        // 查看微信用户列表 
        apiGetWechatUser: (data, callbac) => get('webUser/selectList', data, callbac),
        // 修改冻结状态
        apiEditUserState: (data, callbac) => post('webUser/updateFreezeState', data, callbac),
        // 查看用户信息
        apiViewUserInfo: (data, callbac) => get('webUser/selectById', data, callbac),
        // 审核通过
        apiApproveUser: (data, callbac) => post('webUser/approve', data, callbac),
        // 获取权限列表 ok
        apiGetAuthList: (data, callbac) => get('menu/getAll', data, callbac),
        // 栏目权限信息 ok
        apiGetAuthInfo: (data, callbac) => get('role/getMenuRole', data, callbac),
        // 目录赋权角色 ok
        apiGiveAuth: (data, callbac) => post('menu/addRoleMenu', data, callbac),
        // 删除栏目赋权角色 ok
        apiDelMenuAuth: (data, callbac) => post('menu/delRoleMenu', data, callbac),
        // 日程选择下拉框 ok
        apiGetDaySelect: (data, callbac) => get('EventComment/showOperationList', data, callbac),
        // 活动评论列表
        apiGetCommentList: (data, callbac) => get('EventComment/showCommentList', data, callbac),
        // 评论详情
        apiGetCommentDetail: (data, callbac) => get('EventComment/showCommentDetail', data, callbac),
        // 删除评论
        apiDelComment: (data, callbac) => post('EventComment/deleteComment', data, callbac),
        // 统计分析 活动列表
        apiGetActivityStatis: (data, callbac) => get('statistics/getEventShaft', data, callbac),
        // 总关注人数
        apiGetWeChatPeopleNum: (data, callbac) => get('statistics/getAttentionCount', data, callbac),
        // 按主活动参与度统计
        apiStatisByMain: (data, callbac) => get('statistics/getEventCount', data, callbac),
        // 按日程事件参与度统计
        apiStatisByDayEvent: (data, callbac) => get('statistics/getScheduleCount', data, callbac),
        /// 主统计项详情
        apiStatisMainDetail: (data, callbac) => get('statistics/selectBySchedule', data, callbac),
        // 参与活动人数统计
        apiPartyActivityCount: (data, callbac) => get('statistics/pieCountByCountry', data, callbac),
        // 发表感悟数
        apiPubCommentCount: (data, callbac) => get('statistics/eventCountByEventId', data, callbac),
        // 日程事件发表感悟
        apiDayPubCommentCount: (data, callbac) => get('statistics/getReviewCount', data, callbac),
        // 解冻
        unfreezeEvent: (data, callbac) => post('EventBase/unfreezeEvent', data, callbac),
    }
   
}

